

from analyse.kline_handler.enum import ShapeType
from analyse.kline_handler.handler import KlineHandler
from analyse.kline_handler.shape.large import LargeHandler
from analyse.kline_handler.shape.line import LineHandler
from analyse.kline_handler.shape.medium import MediumHandler
from analyse.kline_handler.shape.small import SmallHandler
from analyse.kline_handler.shape.star import StarHandler


class RiseHandler(KlineHandler):
    def handle(self, kline):
       
        kline_type=self.get_kline_type(kline)
        if kline_type["shape_type"]==ShapeType.一字.value:
            return LineHandler().handle(kline)
        elif kline_type["shape_type"]==ShapeType.星线.value:
            return StarHandler().handle(kline)
        elif kline_type["shape_type"]==ShapeType.小.value:
            return SmallHandler().handle(kline)
        elif kline_type["shape_type"]==ShapeType.中.value:
            return MediumHandler().handle(kline)
        elif kline_type["shape_type"]==ShapeType.大.value:
            return LargeHandler().handle(kline)
        